package lab.southpark.demo.control.services.fake
{
	import com.southpark.framework.control.proxies.IProxy;
	import com.southpark.framework.control.services.IService;
	
	import flash.utils.setTimeout;
	
	
	public class BaseFakeService implements IService
	{	
        protected var delay:Number;
        protected var proxy:IProxy;
        protected var backendMethod:String;
        protected var paramters:Array;
        
		
		public function BaseFakeService(proxy:IProxy)
		{
   			this.proxy = proxy;
		}
		
		public function execute(backendMethod:String,paramters:Array):void
        {
        	this.backendMethod = backendMethod;
        	this.paramters = paramters;
        	
        	if (isNaN(delay) || delay == 0)
        	{
        		fakeExecute();
        		return;
        	};
        	
        	setTimeout(fakeExecute,delay);
        }
        
        
        protected function fakeExecute():void
        {
        	
        }

	}
}